<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

class UserMsgNews
{
    public $login = true; //是否需要登录才能访问该接口
    public $title = "007用户提醒通知列表ok";
    public $group = '用户';
    public $desc = "";

    public $input = [

    ];

    public $output = [
        'list' => [
            [
                'id' => 'label=id;',
                'title' => 'label=标题;',
                'content' => 'label=消息内容;',
                'create_time' => 'label=创建时间;',
            ]
        ]
    ];

    public function run($param, $uid)
    {
        $list = (array)M('user_msg')->where(['uid' => $uid, 'expire_time' => ['GT', date('Y-m-d H:i:s')]])->select();
        return [
            'list' => $list,
        ];
    }
}
